<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<center>
		<form action="{url:/yg/adds}" method="post">
			<table>
				<tr>
					<td>用户名:</td>
					<td><input type="text" name="u_name" id="u_name"></td>
				</tr>
				<tr>
					<td>密码:</td>
					<td><input type="password" name="u_pwd" id="u_pwd"></td>
				</tr>
				<tr>
					<td>确认密码:</td>
					<td><input type="password" name="u_pwd1" id="u_pwd1"></td>
				</tr>
				<tr>
					<td>真实姓名:</td>
					<td><input type="text" name="u_zname"></td>
				</tr>
				<tr>
					<td>工资:</td>
					<td><input type="text" name="u_price" id="u_price"></td>
				</tr>
				<tr>
					<td><input type="submit" value="注册"></td>
				</tr>
			</table>
		</form>
	</center>
</body>
</html>
<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script>
//判断用户名不可以为空
	$(document).on("blur","#u_name",function(){
      //接值
      var u_name=$("#u_name").val();
      if(u_name=="")
      {
      	alert("员工姓名不可以为空");
      }
      else
      {
      	alert("对")
      }

	})
//判断密码不可以为空
	$(document).on("blur","#u_pwd",function(){
      //接值
      var u_pwd=$("#u_pwd").val();
      if(u_pwd=="")
      {
      	alert("员工密码不可以为空");
      }
      else
      {
      	alert("对")
      }

	})
	//判断价格不可以为空
		$(document).on("blur","#u_price",function(){
      //接值
      var u_price=$("#u_price").val();
      if(u_price=="")
      {
      	alert("员工工资不可以为空");
      }
      else
      {
      	alert("对")
      }

	})
</script>
